<?php 
session_start();
$lkdate = $_GET['lkdate']; 

include "../../includes/functions.php";
include "../../includes/date.php";

echo db_connect(); 
 
 /// put auth check here

 $query = "select * from shows";
 $result = mysql_query ($query);
 
 while ($row = mysql_fetch_array($result)) {
								 
					$dow = explode ('|',$row['day_of_week']);			 
					
					foreach ($dow as $day) {
						
						$query2 = "insert into show_occurrances values ('".$row['show_id']."','".$day."','".$row['time_start']."','".$row['time_end']."')";
						$result2 = mysql_query($query2);
						
						if (!$result2) echo "-------errata";
						
						echo "<br />$query2";
						
						
					}
								 
								 
								 }
								 
								 